Optimal. Leaf size=205 \[ \frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {1}{3} a^2 c^2 x+2 a^2 c^2 x \tan ^{-1}(a x)^2-i a c^2 \text {Li}_2\left (\frac {2}{1-i a x}-1\right )+\frac {5}{3} i a c^2 \text {Li}_2\left (1-\frac {2}{i a x+1}\right )+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {1}{3} a c^2 \tan ^{-1}(a x)-\frac {c^2 \tan ^{-1}(a x)^2}{x}+\frac {10}{3} a c^2 \log \left (\frac {2}{1+i a x}\right ) \tan ^{-1}(a x)+2 a c^2 \log \left (2-\frac {2}{1-i a x}\right ) \tan ^{-1}(a x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 20, number of rules used = 13, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.591, Rules used = {4948, 4846, 4920, 4854, 2402, 2315, 4852, 4924, 4868, 2447, 4916, 321, 203} \[ -i a c^2 \text {PolyLog}\left (2,-1+\frac {2}{1-i a x}\right )+\frac {5}{3} i a c^2 \text {PolyLog}\left (2,1-\frac {2}{1+i a x}\right )+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {1}{3} a^2 c^2 x+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {1}{3} a c^2 \tan ^{-1}(a x)-\frac {c^2 \tan ^{-1}(a x)^2}{x}+\frac {10}{3} a c^2 \log \left (\frac {2}{1+i a x}\right ) \tan ^{-1}(a x)+2 a c^2 \log \left (2-\frac {2}{1-i a x}\right ) \tan ^{-1}(a x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 321
Rule 2315
Rule 2402
Rule 2447
Rule 4846
Rule 4852
Rule 4854
Rule 4868
Rule 4916
Rule 4920
Rule 4924
Rule 4948
Rubi steps
\begin {align*} \int \frac {\left (c+a^2 c x^2\right )^2 \tan ^{-1}(a x)^2}{x^2} \, dx &=\int \left (2 a^2 c^2 \tan ^{-1}(a x)^2+\frac {c^2 \tan ^{-1}(a x)^2}{x^2}+a^4 c^2 x^2 \tan ^{-1}(a x)^2\right ) \, dx\\ &=c^2 \int \frac {\tan ^{-1}(a x)^2}{x^2} \, dx+\left (2 a^2 c^2\right ) \int \tan ^{-1}(a x)^2 \, dx+\left (a^4 c^2\right ) \int x^2 \tan ^{-1}(a x)^2 \, dx\\ &=-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+\left (2 a c^2\right ) \int \frac {\tan ^{-1}(a x)}{x \left (1+a^2 x^2\right )} \, dx-\left (4 a^3 c^2\right ) \int \frac {x \tan ^{-1}(a x)}{1+a^2 x^2} \, dx-\frac {1}{3} \left (2 a^5 c^2\right ) \int \frac {x^3 \tan ^{-1}(a x)}{1+a^2 x^2} \, dx\\ &=i a c^2 \tan ^{-1}(a x)^2-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+\left (2 i a c^2\right ) \int \frac {\tan ^{-1}(a x)}{x (i+a x)} \, dx+\left (4 a^2 c^2\right ) \int \frac {\tan ^{-1}(a x)}{i-a x} \, dx-\frac {1}{3} \left (2 a^3 c^2\right ) \int x \tan ^{-1}(a x) \, dx+\frac {1}{3} \left (2 a^3 c^2\right ) \int \frac {x \tan ^{-1}(a x)}{1+a^2 x^2} \, dx\\ &=-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+4 a c^2 \tan ^{-1}(a x) \log \left (\frac {2}{1+i a x}\right )+2 a c^2 \tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )-\frac {1}{3} \left (2 a^2 c^2\right ) \int \frac {\tan ^{-1}(a x)}{i-a x} \, dx-\left (2 a^2 c^2\right ) \int \frac {\log \left (2-\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx-\left (4 a^2 c^2\right ) \int \frac {\log \left (\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx+\frac {1}{3} \left (a^4 c^2\right ) \int \frac {x^2}{1+a^2 x^2} \, dx\\ &=\frac {1}{3} a^2 c^2 x-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+\frac {10}{3} a c^2 \tan ^{-1}(a x) \log \left (\frac {2}{1+i a x}\right )+2 a c^2 \tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )-i a c^2 \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )+\left (4 i a c^2\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i a x}\right )-\frac {1}{3} \left (a^2 c^2\right ) \int \frac {1}{1+a^2 x^2} \, dx+\frac {1}{3} \left (2 a^2 c^2\right ) \int \frac {\log \left (\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx\\ &=\frac {1}{3} a^2 c^2 x-\frac {1}{3} a c^2 \tan ^{-1}(a x)-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+\frac {10}{3} a c^2 \tan ^{-1}(a x) \log \left (\frac {2}{1+i a x}\right )+2 a c^2 \tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )-i a c^2 \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )+2 i a c^2 \text {Li}_2\left (1-\frac {2}{1+i a x}\right )-\frac {1}{3} \left (2 i a c^2\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i a x}\right )\\ &=\frac {1}{3} a^2 c^2 x-\frac {1}{3} a c^2 \tan ^{-1}(a x)-\frac {1}{3} a^3 c^2 x^2 \tan ^{-1}(a x)+\frac {2}{3} i a c^2 \tan ^{-1}(a x)^2-\frac {c^2 \tan ^{-1}(a x)^2}{x}+2 a^2 c^2 x \tan ^{-1}(a x)^2+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)^2+\frac {10}{3} a c^2 \tan ^{-1}(a x) \log \left (\frac {2}{1+i a x}\right )+2 a c^2 \tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )-i a c^2 \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )+\frac {5}{3} i a c^2 \text {Li}_2\left (1-\frac {2}{1+i a x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 167, normalized size = 0.81 \[ \frac {c^2 \left (a^4 x^4 \tan ^{-1}(a x)^2-a^3 x^3 \tan ^{-1}(a x)+a^2 x^2+6 a^2 x^2 \tan ^{-1}(a x)^2-5 i a x \text {Li}_2\left (-e^{2 i \tan ^{-1}(a x)}\right )-3 i a x \text {Li}_2\left (e^{2 i \tan ^{-1}(a x)}\right )-8 i a x \tan ^{-1}(a x)^2-a x \tan ^{-1}(a x)-3 \tan ^{-1}(a x)^2+6 a x \tan ^{-1}(a x) \log \left (1-e^{2 i \tan ^{-1}(a x)}\right )+10 a x \tan ^{-1}(a x) \log \left (1+e^{2 i \tan ^{-1}(a x)}\right )\right )}{3 x} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.80, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (a^{4} c^{2} x^{4} + 2 \, a^{2} c^{2} x^{2} + c^{2}\right )} \arctan \left (a x\right )^{2}}{x^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 346, normalized size = 1.69 \[ \frac {a^{4} c^{2} x^{3} \arctan \left (a x \right )^{2}}{3}+2 a^{2} c^{2} x \arctan \left (a x \right )^{2}-\frac {c^{2} \arctan \left (a x \right )^{2}}{x}-\frac {a^{3} c^{2} x^{2} \arctan \left (a x \right )}{3}+2 a \,c^{2} \arctan \left (a x \right ) \ln \left (a x \right )-\frac {8 a \,c^{2} \arctan \left (a x \right ) \ln \left (a^{2} x^{2}+1\right )}{3}+\frac {a^{2} c^{2} x}{3}-\frac {a \,c^{2} \arctan \left (a x \right )}{3}+\frac {4 i a \,c^{2} \ln \left (a x +i\right ) \ln \left (a^{2} x^{2}+1\right )}{3}-i a \,c^{2} \dilog \left (-i a x +1\right )-\frac {2 i a \,c^{2} \ln \left (a x +i\right )^{2}}{3}+\frac {2 i a \,c^{2} \ln \left (a x -i\right )^{2}}{3}+\frac {4 i a \,c^{2} \dilog \left (-\frac {i \left (a x +i\right )}{2}\right )}{3}-\frac {4 i a \,c^{2} \dilog \left (\frac {i \left (a x -i\right )}{2}\right )}{3}+\frac {4 i a \,c^{2} \ln \left (a x -i\right ) \ln \left (-\frac {i \left (a x +i\right )}{2}\right )}{3}+i a \,c^{2} \dilog \left (i a x +1\right )-\frac {4 i a \,c^{2} \ln \left (a x -i\right ) \ln \left (a^{2} x^{2}+1\right )}{3}+i a \,c^{2} \ln \left (a x \right ) \ln \left (i a x +1\right )-\frac {4 i a \,c^{2} \ln \left (a x +i\right ) \ln \left (\frac {i \left (a x -i\right )}{2}\right )}{3}-i a \,c^{2} \ln \left (a x \right ) \ln \left (-i a x +1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {atan}\left (a\,x\right )}^2\,{\left (c\,a^2\,x^2+c\right )}^2}{x^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ c^{2} \left (\int 2 a^{2} \operatorname {atan}^{2}{\left (a x \right )}\, dx + \int \frac {\operatorname {atan}^{2}{\left (a x \right )}}{x^{2}}\, dx + \int a^{4} x^{2} \operatorname {atan}^{2}{\left (a x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________